package com.crm.customers.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.customers.dao.ExpressDao;
import com.crm.customers.model.Express;
import com.crm.customers.service.ExpressService;
@Service("expressService")
public class ExpressServiceImpl implements ExpressService {

	@Autowired
	private ExpressDao  expressDao;
	
	@Override
	public Express saveExpress(Express c) {
		return expressDao.saveExpress(c);
	}

	@Override
	public int updateExpress(Express c) {
		return expressDao.updateExpress(c);
	}

	@Override
	public List<Express> getExpress(Express c, int pageNo, int pageSize) {
		c.setStartsize((pageNo-1)*pageSize);
		c.setEndsize(pageSize);
		return expressDao.getExpress(c);
	}

}
